package com.tql.view.service.impl;

import com.github.pagehelper.PageHelper;
import com.tql.view.mapper.LogisMapper;
import com.tql.view.pojo.Logs;
import com.tql.view.service.LogsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
import java.util.Map;

@Service
public class LogsServiceImpl implements LogsService {
    @Autowired
    private LogisMapper logisMapper;
    @Override
    public List<Logs> selectAllLogs(Integer page,Integer size) {
        PageHelper.startPage(page,size);
        return logisMapper.selectAllLogs( page, size);
    }

    @Override
    public void insertLogs(Logs logs) {
        logisMapper.insertLogs(logs);
    }

    @Override
    public List<Logs> selectAllLogsBy(Integer page, Integer size,String account, Date begintime, Date endtime) {
        PageHelper.startPage(page,size);
        return logisMapper.selectAllLogsBy(page,size,account,begintime,endtime);
    }
}
